package com.telephone.purchase.service.impl;

import com.telephone.purchase.entity.Users;
import com.telephone.purchase.mapper.UsersMapper;
import com.telephone.purchase.service.UsersService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UsersServiceImpl implements UsersService {
    @Autowired
    private UsersMapper usersMapper;
    @Override
    public Users selectByPrimaryKey(Long userId) {
        return usersMapper.selectByPrimaryKey(userId);
    }

    @Override
    public int updateByPrimaryKeySelective(Users record) {
        return usersMapper.updateByPrimaryKeySelective(record);
    }

    @Override
    public void updateRole(Long userId) {
        usersMapper.updateRole(userId);
    }
}
